import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
from FlagEmbedding import FlagModel

model = FlagModel('/home/abc/FlagEmbedding/bge_model/bge-base-en', devices=0)

sentences = ["Hello world", "Hello world"]
embeddings = model.encode(sentences)
print(f"Embeddings:\n{embeddings}")

scores = embeddings @ embeddings.T
print(f"Similarity scores:\n{scores}")